// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Json.BulkStatsConverter))]
public sealed partial class BulkStats
{
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	public BulkStats(long avgSizeInBytes, System.TimeSpan avgTimeInMillis, long totalOperations, long totalSizeInBytes, System.TimeSpan totalTimeInMillis)
	{
		AvgSizeInBytes = avgSizeInBytes;
		AvgTimeInMillis = avgTimeInMillis;
		TotalOperations = totalOperations;
		TotalSizeInBytes = totalSizeInBytes;
		TotalTimeInMillis = totalTimeInMillis;
	}
#if NET7_0_OR_GREATER
	public BulkStats()
	{
	}
#endif
#if !NET7_0_OR_GREATER
	[System.Obsolete("The type contains required properties that must be initialized. Please use an alternative constructor to ensure all required values are properly set.")]
	public BulkStats()
	{
	}
#endif
	[System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
	internal BulkStats(Elastic.Clients.Elasticsearch.Serialization.JsonConstructorSentinel sentinel)
	{
		_ = sentinel;
	}

	public Elastic.Clients.Elasticsearch.ByteSize? AvgSize { get; set; }
	public
#if NET7_0_OR_GREATER
	required
#endif
	long AvgSizeInBytes { get; set; }
	public Elastic.Clients.Elasticsearch.Duration? AvgTime { get; set; }
	public
#if NET7_0_OR_GREATER
	required
#endif
	System.TimeSpan AvgTimeInMillis { get; set; }
	public
#if NET7_0_OR_GREATER
	required
#endif
	long TotalOperations { get; set; }
	public Elastic.Clients.Elasticsearch.ByteSize? TotalSize { get; set; }
	public
#if NET7_0_OR_GREATER
	required
#endif
	long TotalSizeInBytes { get; set; }
	public Elastic.Clients.Elasticsearch.Duration? TotalTime { get; set; }
	public
#if NET7_0_OR_GREATER
	required
#endif
	System.TimeSpan TotalTimeInMillis { get; set; }
}